package cn.edu.fzu.homemaking.domain.enums;

/**
 * @Author jiebin
 * @Date 2023/4/14
 */
public enum CommentStatusEnum {

    NO(0, "暂未评论"),
    YES(1, "已评论");

    private final int    value;
    private final String desc;


    private CommentStatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static CommentStatusEnum parse(int value) {
        switch (value) {
            case 0:
                return NO;
            case 1:
                return YES;
            default:
                return null;
        }
    }
}
